package com.wenwen.social.util;

import lombok.Data;

@Data
public class PageUtil {
	private Integer pageNum;
	private Integer pageSize;

	private Integer startNum;
	private Integer endNum;

	public PageUtil(Integer pageNum, Integer pageSize) {

		this.pageNum = pageNum == null ? 1 : pageNum;
		this.pageSize = pageSize == null ? 10 : pageSize;

		this.startNum = (pageNum - 1) * pageSize;
		this.endNum = startNum + pageSize - 1;
	}
}
